package org.jeecg.modules.system.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.system.entity.SysArea;
import org.jeecg.modules.system.service.ISysAreaService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@AllArgsConstructor
@RequestMapping("/area")
@Api(tags = "地址")
public class SysAreaController {

    private final ISysAreaService areaService;
    
    @GetMapping("/province")
    public Result<Object> province() {
        List<SysArea> list = areaService.list(
                new QueryWrapper<SysArea>().eq("m_type", 1)
        );
        return Result.ok(list);
    }

}
